<template>
  <div>
    <table-box
      ref="refTable"
      :selected-arry.sync="tableSelected"
      :table-config="tableConfig"
      :other-filters="otherFilters"
      :table-height="280"
      no-request
    >
      <el-table-column slot="before" fixed="left" label="序号" type="index" width="70" />
    </table-box>
  </div>
</template>

<script>
import { parseTime } from '@/utils'
import authMixin from './authMixin'
export default {
  name: 'UserAutUserGroupTable',
  mixins: [authMixin],
  props: {
  },
  data() {
    return {
      tableConfig: {
        interfacePath: `/ucenter/api/v2/user/${this.userId}/domain/${this.domainId}/userGroup/page`,
        hideFuncBar: false,
        onlySearchBar: true,
        setting: [
          {
            prop: 'userGroupName',
            label: '用户组名称',
            minWidth: 130
          },
          {
            prop: 'userGroupDesc',
            label: '用户组描述',
            minWidth: 130
          },
          {
            prop: 'num',
            label: '用户组人数',
            minWidth: 130
          },
          {
            prop: 'createBy',
            label: '授权人',
            minWidth: 100
          },
          {
            prop: 'createTime',
            label: '授权时间',
            minWidth: 130,
            type: 'hidden',
            formatData: ({ createTime }) => {
              return parseTime(createTime)
            }
          }]
      },
      visibleAuth: false
    }
  },

  computed: {},
  watch: {
    domainId(val, oldVal) {
      this.tableConfig.interfacePath = `/ucenter/api/v2/user/${this.userId}/domain/${this.domainId}/userGroup/page`
    }
  },

  methods: {

  }
}
</script>
<style lang='scss' scoped>

</style>
